//
//  NSError+YTAdd.m
//  tesDemo02
//
//  Created by 拓客营 on 2022/3/22.
//

#import "NSError+YTAdd.h"

@implementation NSError (YTAdd)

+ (NSError *)errorWithCode:(NSInteger)code message:(NSString *)message {
    
    NSDictionary *userInfo = message ? @{NSLocalizedDescriptionKey:message} : nil;
    return [NSError errorWithDomain:NSCocoaErrorDomain code:code userInfo:userInfo];
}


@end
